package com.ic.es.controller;


import com.ic.domain.EsPassingVehicleRecord;
import com.ic.es.service.EsPassingVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/passing")
public class EsPassingVehicleController {
    private final EsPassingVehicleService passingVehicleService;

    @Autowired
    public EsPassingVehicleController(EsPassingVehicleService passingVehicleService) {
        this.passingVehicleService = passingVehicleService;
    }

    @PostMapping("/record")
    public void indexPassingVehicleRecord(@RequestBody EsPassingVehicleRecord record) {
        passingVehicleService.indexPassingVehicleRecord(record);
    }

}
